package com.boyi;

import org.hibernate.validator.HibernateValidator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author Administrator
 * @EnableEurekaClient 代表 是个eureka 服务端
 */
@SpringBootApplication
//@EnableAspectJAutoProxy
@MapperScan(basePackages = "com.boyi.db.mapper.**")
@EnableDiscoveryClient
public class ProductApp3 {

    public static void main(String[] args) {
        SpringApplication.run(ProductApp3.class, args);
    }

    @Bean
    public LocalValidatorFactoryBean localValidatorFactoryBean() {
        LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean();
        localValidatorFactoryBean.setProviderClass(HibernateValidator.class);
        return localValidatorFactoryBean;
    }
}


